package com.study.sxc.Entity;

public class User {
    private Integer userId;    // 用户ID
    private String name;       // 用户姓名
    private String contact;    // 联系方式
    private String studentId;  // 学号

    // 无参构造方法
    public User() {}

    // 全参构造方法
    public User(Integer userId, String name, String contact, String studentId) {
        this.userId = userId;
        this.name = name;
        this.contact = contact;
        this.studentId = studentId;
    }

    // Getter和Setter方法
    public Integer getUserId() {
        return userId;
    }
    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getContact() {
        return contact;
    }
    public void setContact(String contact) {
        this.contact = contact;
    }
    public String getStudentId() {
        return studentId;
    }
    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    // toString方法
    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", name='" + name + '\'' +
                ", contact='" + contact + '\'' +
                ", studentId='" + studentId + '\'' +
                '}';
    }
}